package com.test.neo4j.Entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.neo4j.ogm.annotation.GeneratedValue;
import org.neo4j.ogm.annotation.Id;
import org.neo4j.ogm.annotation.NodeEntity;
import org.neo4j.ogm.annotation.Property;

import java.io.Serializable;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@NodeEntity("Person")   // 标签为Persion
public class Person implements Serializable {
    @Id
    @GeneratedValue //设置主键自增
    private Long id;
    @Property
    private String name;
    @Property
    private String sex;
    @Property
    private int age;

//    public Person(String name) {
//        this.name = name;
//    }
}
